# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=sflowtool
pkgver=6.02
pkgrel=0
pkgdesc="Print binary sFlow feed to ASCII, or forward it to other collectors"
url="https://github.com/sflow/sflowtool"
arch="all"
license="custom"
subpackages="$pkgname-doc"
makedepends="$depends_dev autoconf automake"
source="$pkgname-$pkgver.tar.gz::https://github.com/sflow/sflowtool/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	aclocal && autoconf && autoreconf -f -i -Wall,no-obsolete
}

build() {
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
}

sha512sums="
532dcd70f4739f870b21c56c46d2751961615c4a212ba26c1ab43b0e37b9230617b29b22c8e4fa8534094fa4cdd7acad9bbc48ac7368320653da1f46ae6e3b6b  sflowtool-6.02.tar.gz
"
